const path=require('path')
const express = require('express')
const db=require('./db/connect')
const app = express()
const port = 3000
const mailHelper=require('./helpers/mailHelper')
const bodyparser=require('body-parser')

app.use(bodyparser.urlencoded({extended:false}))
app.use(bodyparser.json())

app.use('/public',express.static(path.join(__dirname,'./public')))

const foodRouter=require('./routers/foodRouter')
const userRouter=require('./routers/userRouter')
app.use('/food',foodRouter)
app.use('/user',userRouter)

app.listen(port, () => console.log(`server start listening on port http://127.0.0.1:${port}!`))